Learn R Programming

bioRad (version 0.5.2)

[.vpts: Subset a time series of vertical profiles (vpts)

Description

Select a vertical profile (vp) or a time series of vertical profiles (vpts) by index from a vpts.

Usage

# S3 method for vpts
[(x, i)

Arguments

x

A vpts object.

i

Integer. Index/indices specifying which range of vertical profiles to extract.

Value

A vpts object containing a subset of vertical profiles (vp) or a vp object when subsetting a single vertical profile (vp).

Examples

Run this code
# NOT RUN {
# Load the example time series of vertical profiles
vpts <- example_vpts

# This vpts contains 1934 profiles (i.e. datetimes)
dim(vpts)

# Subset vpts to extract 10th profile
vpts[10] # A vp object

# Subset vpts to extract the 20th to 100th profile
vpts[20:100] # A vpts object with 81 profiles

# Subset vpts to remove the first 10 profiles
vpts[-1:-10] # A vpts object with 10 less profiles
# }

Run the code above in your browser using DataLab